Add --restart-from-slice and global --skip-slices for partial Z alignment restarts#24
Add --restart-from-slice and global --skip-slices for partial Z alignment restarts#24msayr wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c3645fcec9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| for global_z in skip_slices: | ||
| if global_start <= global_z < global_end: | ||
| local_z = int(local_z_min) + global_z - global_start | ||
| existing.add(local_z) |
There was a problem hiding this comment.
Guard against skipping the first flow slice
When --skip-slices names the first slice whose flow is computed for a stack (the stack start for referenced/downstream stacks, or the second local slice for a self-aligned root stack), this adds that local index to ignore_slices_flow. The ignore branch in _compute_flow synthesizes a skipped flow with flows[-1], so with no prior flow it raises IndexError before any progress can be made. Please reject/remap these boundary skips or make the flow code handle an initial skipped slice.
Useful? React with 👍 / 👎.
Motivation
Description
emalign/align_dataset_z.py:_dataset_global_bounds,_zero_store_from_slice,_prepare_partial_restart, and_apply_skip_slicesto compute dataset Z ranges, clear outputs, reset MongoDB progress, and map global skip indices to per-dataset localignore_slices_flowentries.align_dataset_zfunction signature and CLI with--restart-from-sliceand--skip-slices, wired these options into startup logic so--restart-from-sliceclears destination stores (full, mask, downsampled) from the given global slice onward and resets progress/docs/z_alignedfor affected stacks.--skip-slicesinto each dataset config by adding the corresponding local indices toignore_slices_flowso flow computation will skip those slices automatically.--wipe-progressbehavior and integrated partial-restart logic to only clear/modify progress for stacks that overlap the requested restart slice; changes are confined toemalign/align_dataset_z.py.Testing
python -m py_compile emalign/align_dataset_z.pywhich succeeded without syntax errors.CUDA_VISIBLE_DEVICES=0 PYTHONPATH=. python -m emalign.align_dataset_z --helpbut the run was blocked by the environment failing to importcv2(libGL.so.1missing), so full CLI execution/interactive help could not be exercised here.Codex Task